package com.kingcore.director.setting.ui;

import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTabbedPane;
import javax.swing.JTextField;

import wzw.swing.LinkLabel;

import com.kingcore.director.base.ui.DirectorDialog;
import com.kingcore.director.main.MainFrame;


public class AboutDialog extends DirectorDialog {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private JPanel jContentPane = null;
	private JTabbedPane jTabbedPane = null;
	private JButton jButton = null;
	private JPanel jPanel = null;
	private JPanel jPanel1 = null;
	private JPanel jPanel2 = null;
	private JLabel jLabel = null;
	private JLabel jLabel1 = null;
	private JLabel jLabel2 = null;
	private JLabel jLabel3 = null;
	private JTextField jTextField = null;
	private JTextField jTextField1 = null;

	/**
	 * This method initializes jTabbedPane	
	 * 	
	 * @return javax.swing.JTabbedPane	
	 */
	private JTabbedPane getJTabbedPane() {
		if (jTabbedPane == null) {
			jTabbedPane = new JTabbedPane();
			jTabbedPane.setBounds(new java.awt.Rectangle(13,15,416,238));
			jTabbedPane.addTab("About", null, getJPanel(), null);
			//jTabbedPane.addTab("Info", null, getJPanel1(), null);
			jTabbedPane.addTab("Thanks", null, getJPanel2(), null);
		}
		return jTabbedPane;
	}

	/**
	 * This method initializes jButton	
	 * 	
	 * @return javax.swing.JButton	
	 */
	private JButton getJButton() {
		if (jButton == null) {
			jButton = new JButton();
			jButton.setBounds(new java.awt.Rectangle(326,260,86,32));
			jButton.setText("确定(O)");
			jButton.setMnemonic('O');
			jButton.addActionListener(new java.awt.event.ActionListener() {
				public void actionPerformed(java.awt.event.ActionEvent e) {
					dispose();
				}
			});
		}
		return jButton;
	}

	/**
	 * This method initializes jPanel	
	 * 	
	 * @return javax.swing.JPanel	
	 */
	private JPanel getJPanel() {
		if (jPanel == null) {
			jLabel2 = new JLabel();
			jLabel2.setBounds(new java.awt.Rectangle(20,130,358,34));
			jLabel2.setText("Copyright (C) 2002-2005 KingCore Software. All rights reserved.");
			jLabel1 = new JLabel();
			jLabel1.setBounds(new java.awt.Rectangle(47,86,80,23));
			jLabel1.setText("授权使用:");
			jLabel = new JLabel();
			jLabel.setBounds(new java.awt.Rectangle(48,53,80,23));
			jLabel.setText("版权所有:");
			jPanel = new JPanel();
			jPanel.setLayout(null);
			jPanel.add(jLabel, null);
			jPanel.add(jLabel1, null);
			jPanel.add(getJTextField(), null);
			jPanel.add(getJTextField1(), null);
			jPanel.add( jLabel2, null);
			jPanel.add( getAuthorPageLink(), null);
		}
		return jPanel;
	}

	private LinkLabel authorPageLink = null;
	private LinkLabel getAuthorPageLink() {
		if (authorPageLink==null) {
			authorPageLink = new LinkLabel("访问作者网站", "http://www.zhongyi360.cn");
			authorPageLink.setBounds(new java.awt.Rectangle(20,160,200,34));
		}
		return authorPageLink;
	}

	/**
	 * This method initializes jPanel1	
	 * 	
	 * @return javax.swing.JPanel	
	 */
	private JPanel getJPanel1() {
		if (jPanel1 == null) {
			jPanel1 = new JPanel();
			jPanel1.setLayout(null);
		}
		return jPanel1;
	}

	/**
	 * This method initializes jPanel2	
	 * 	
	 * @return javax.swing.JPane2	
	 */
	private JPanel getJPanel2() {
		if (jPanel2 == null) {
			jPanel2 = new JPanel();
			jPanel2.setLayout(null);

			jLabel3 = new JLabel();
			jLabel3.setBounds(new java.awt.Rectangle(25,53,390,23));
			jLabel3.setText("Thinks all people who love us、support us、encourage us.");

			jPanel2.add(jLabel3, null);
		}
		return jPanel2;
	}

	/**
	 * This method initializes jTextField	
	 * 	
	 * @return javax.swing.JTextField	
	 */
	private JTextField getJTextField() {
		if (jTextField == null) {
			jTextField = new JTextField();
			jTextField.setBounds(new java.awt.Rectangle(160,53,140,23));
			jTextField.setEditable(false);
			jTextField.setText("KingCore Software");
		}
		return jTextField;
	}

	/**
	 * This method initializes jTextField1	
	 * 	
	 * @return javax.swing.JTextField	
	 */
	private JTextField getJTextField1() {
		if (jTextField1 == null) {
			jTextField1 = new JTextField();
			jTextField1.setBounds(new java.awt.Rectangle(160,86,140,23));
			jTextField1.setEditable(false);
			jTextField1.setText("Free User");
		}
		return jTextField1;
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub

	}

	/**
	 * This is the default constructor
	 */
	public AboutDialog() {
		super();
		initialize();
	}

	/**
	 * This is the default constructor
	 */
	public AboutDialog(MainFrame mf) {
		super(mf, true);
		initialize();
	}
	
	/**
	 * This method initializes this
	 * 
	 * @return void
	 */
	private void initialize() {
		this.setSize(450, 326);
		this.setResizable(false);
		this.setContentPane(getJContentPane());
		this.setTitle("关于系统...");
	}

	/**
	 * This method initializes jContentPane
	 * 
	 * @return javax.swing.JPanel
	 */
	private JPanel getJContentPane() {
		if (jContentPane == null) {
			jContentPane = new JPanel();
			jContentPane.setLayout(null);
			jContentPane.add(getJTabbedPane(), null);
			jContentPane.add(getJButton(), null);
		}
		return jContentPane;
	}

}  //  @jve:decl-index=0:visual-constraint="10,10"
